
package kaizone.haining.chaobohui.json;

import org.json.JSONObject;

public class TushuoItem extends Item {

    public static final String CATEGORY = "category";

    public static final String CONTENT = "content";

    public static final String STATUS = "status";

    public static final String TUSHUOCOUNT = "tushuoCount";

    private String category;

    private String content;

    private String status;

    private int tushuoCount;

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public int getTushuoCount() {
        return tushuoCount;
    }

    public void setTushuoCount(int tushuoCount) {
        this.tushuoCount = tushuoCount;
    }

    public static TushuoItem parse(JSONObject jsonObject) {
        TushuoItem tushuoItem = new TushuoItem();

        Item item = Item.parse(jsonObject);
        tushuoItem.setItem(item);

        tushuoItem.setCategory(jsonObject.optString(CATEGORY));
        tushuoItem.setContent(jsonObject.optString(CONTENT));
        tushuoItem.setStatus(jsonObject.optString(STATUS));
        tushuoItem.setTushuoCount(jsonObject.optInt(TUSHUOCOUNT));

        return tushuoItem;
    }

}
